package in.muton.edushare.poll.panels;

import org.apache.wicket.markup.html.internal.HtmlHeaderContainer;
import org.apache.wicket.model.IModel;

import com.edushare.common.vo.CourseInstances;

import in.muton.edushare.pages.EduShareBasePage;
import in.muton.edushare.pages.common.EdusharePanel;

public class AttendancePanel extends EdusharePanel {

	private static final long serialVersionUID = -5473193895502736706L;

	public AttendancePanel(String id, IModel<CourseInstances> model, EduShareBasePage page) {
		super(id, model, page);
		// TODO Auto-generated constructor stub
		System.out.println("inside pabel");
	}
	
	@Override
	public void renderHead(HtmlHeaderContainer container) {
		container.getHeaderResponse().renderOnDomReadyJavascript(""//+
				/*"var tt = 1;"+
				"$('.cb input').hide();"+
				"$('#mycal').datepicker({beforeShowDay: function(date){"+
																"var dd = new Date();"+
																"if(date.getDay() == 0 || date.getDay() == 6){"+
																	"return [false, '', 'No Data'];"+
																"}else if(date.getDate()%tt == 0){"+
																	"tt++;"+
																	"if(window.console){console.log('test: ' + date); }"+
																	"return [false, 'hlcal1', 'Absent'];"+
																"}else{"+
																	"if(window.console){console.log('test: ' + date); }"+
																	"return [false, 'hlcal', 'Present'];"+
																"}"+
															"}"+
									"});"+
			
				"$('#mycal').next().click(function(e){e.preventDefault();$(this).prev().toggle();return false;});"+*/
				//$('#fillAtt').click(function(e){e.preventDefault();$('attdTkCal').show(); return false;});
				/*"$('#fillAtt').datepicker({"+
										 "maxDate: new Date(),"+
										   "onSelect: function(date){"+
												"$('#attdRun').show();"+
												"$('#attdDate').text(date);"+
												"$('.cb input').show();"+
												"$(this).hide();"+
												"$('#fillAtt').next().attr('disabled', true);"+
										    "}"+
										 "});"+
				"$('#fillAtt').next().click(function(e){e.preventDefault();$(this).prev().toggle();return false;});"+
				"$('#attdCan').click(function(e){"+
											"e.preventDefault();"+
											"$('#fillAtt').next().attr('disabled', false);"+
											"$('.cb input').attr('checked', false).hide();"+
											"$('#attdRun').hide();"+
										"});"+
				"$('#newCal').click(function(e){"+
						"e.preventDefault();"+
						"$(this).prev('div').toggle();"+
						"return false;"+
				"});"*/);
	}

}
